# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.FusionTables.V2.Model.PolygonStyle do
  @moduledoc """
  Represents a PolygonStyle within a StyleSetting

  ## Attributes

  *   `fillColor` (*type:* `String.t`, *default:* `nil`) - Color of the interior of the polygon in #RRGGBB format.
  *   `fillColorStyler` (*type:* `GoogleApi.FusionTables.V2.Model.StyleFunction.t`, *default:* `nil`) - Column-value, gradient, or bucket styler that is used to determine the interior color and opacity of the polygon.
  *   `fillOpacity` (*type:* `float()`, *default:* `nil`) - Opacity of the interior of the polygon: 0.0 (transparent) to 1.0 (opaque).
  *   `strokeColor` (*type:* `String.t`, *default:* `nil`) - Color of the polygon border in #RRGGBB format.
  *   `strokeColorStyler` (*type:* `GoogleApi.FusionTables.V2.Model.StyleFunction.t`, *default:* `nil`) - Column-value, gradient or buckets styler that is used to determine the border color and opacity.
  *   `strokeOpacity` (*type:* `float()`, *default:* `nil`) - Opacity of the polygon border: 0.0 (transparent) to 1.0 (opaque).
  *   `strokeWeight` (*type:* `integer()`, *default:* `nil`) - Width of the polyon border in pixels.
  *   `strokeWeightStyler` (*type:* `GoogleApi.FusionTables.V2.Model.StyleFunction.t`, *default:* `nil`) - Column-value or bucket styler that is used to determine the width of the polygon border.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :fillColor => String.t(),
          :fillColorStyler => GoogleApi.FusionTables.V2.Model.StyleFunction.t(),
          :fillOpacity => float(),
          :strokeColor => String.t(),
          :strokeColorStyler => GoogleApi.FusionTables.V2.Model.StyleFunction.t(),
          :strokeOpacity => float(),
          :strokeWeight => integer(),
          :strokeWeightStyler => GoogleApi.FusionTables.V2.Model.StyleFunction.t()
        }

  field(:fillColor)
  field(:fillColorStyler, as: GoogleApi.FusionTables.V2.Model.StyleFunction)
  field(:fillOpacity)
  field(:strokeColor)
  field(:strokeColorStyler, as: GoogleApi.FusionTables.V2.Model.StyleFunction)
  field(:strokeOpacity)
  field(:strokeWeight)
  field(:strokeWeightStyler, as: GoogleApi.FusionTables.V2.Model.StyleFunction)
end

defimpl Poison.Decoder, for: GoogleApi.FusionTables.V2.Model.PolygonStyle do
  def decode(value, options) do
    GoogleApi.FusionTables.V2.Model.PolygonStyle.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.FusionTables.V2.Model.PolygonStyle do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
